﻿using System.Collections.Generic;

namespace Bilibili.Model.Live
{
    public sealed class LiveHome
    {
        public List<LiveBanner> banner { get; set; }
        public List<LiveAreaEntrance> area_entrance_v2 { get; set; }
        public List<LiveAreaEntrance> area_entrance { get; set; }
        public List<LiveHourRank> hour_rank { get; set; }
        public List<RoomList> room_list { get; set; }
    }
    public sealed class LiveModuleInfo
    {
        public int id { get; set; }
        public int type { get; set; }
        public int sort { get; set; }
        public string title { get; set; }
        public string link { get; set; }
        public string pic { get; set; }
        public int count { get; set; }
    }
    public sealed class LiveExtraInfo
    {
        public string sub_title { get; set; }
    }
    public sealed class LiveAreaEntrance
    {
        public LiveModuleInfo module_info { get; set; }
        public List<LiveAreaEntranceItem> list { get; set; }
    }
    public sealed class LiveAreaEntranceItem
    {
        public int id { get; set; }
        public string title { get; set; }
        public string link { get; set; }
        public string pic { get; set; }
        public int area_v2_id { get; set; }
        public int area_v2_parent_id { get; set; }
        public int tag_type { get; set; }
    }
    public sealed class LiveBanner
    {
        public LiveModuleInfo module_info { get; set; }
        public List<LiveBannerItem> list { get; set; }
    }
    public sealed class LiveBannerItem
    {
        public int id { get; set; }
        public string title { get; set; }
        public string link { get; set; }
        public string pic { get; set; }
        public string content { get; set; }
    }
    public sealed class LiveHourRank
    {
        public LiveModuleInfo module_info { get; set; }
        public LiveExtraInfo extra_info { get; set; }
        public List<LiveHourRankItem> list { get; set; }
    }
    public sealed class LiveHourRankItem
    {
        public int uid { get; set; }
        public int roomid { get; set; }
        public string uname { get; set; }
        public string face { get; set; }
        public int area_v2_parent_id { get; set; }
        public int area_v2_id { get; set; }
        public string area_v2_name { get; set; }
        public string area_v2_parent_name { get; set; }
    }
    public class RoomList
    {
        public LiveModuleInfo module_info { get; set; }
        public List<RoomListItem> list { get; set; }
    }
    public sealed class RoomListItem
    {
        public int area_v2_parent_id { get; set; }
        public int area_v2_id { get; set; }
        public string face { get; set; }
        public int area_id { get; set; }
        public string area_name { get; set; }
        public string parent_name { get; set; }
        public string area_v2_name { get; set; }
        public string area_v2_parent_name { get; set; }
        public string cover { get; set; }
        public string title { get; set; }
        public int roomid { get; set; }
        public string uname { get; set; }
        public long online { get; set; }
        public string online_str
        {
            get
            {
                if (online >= 10000)
                    return (online / 10000).ToString("0.00") + "万";
                else
                    return online.ToString();
            }
        }
    }
}